********************************************************************************
******"Macroprudential Regulation, Quantitative Easing, and Bank Lending"*******
********************************************************************************

********************************************************************************
********************************************************************************
**********************************2019******************************************
********************************************************************************
********************************************************************************
global y "lncdisburold_w199"
global regcommands ", absorb(bankid#time prov) vce(cluster bankid prov)"

clear *
**# Bookmark (input)
use $inputdirectory/INB_provbank2019

gen lncdisburold=100*(ln(disburol)-ln(L.disburold))
keep if time>=tm(2019m3)&time<=tm(2020m3)
winsor2 lncdisburold if lncdisburold!=., suffix(_w199) cuts(1 99)

run RO_tdummies 2019 12
run RO_tdintera 12 "sharedis66 sharedis6633"

**# Bookmark (output - column 1)
cd $outputdirectory
est clear
*reghdfe $y dT*sharedis66 if dtop66e14==0&dmid6633e14==0 $regcommands
reghdfe $y dT*sharedis66 dT*sharedis6633 if dtop66e14==0&dmid6633e14==0  $regcommands
est save TABVA_C12
cd ..

********************************************************************************
********************************************************************************
**********************************2015******************************************
********************************************************************************
********************************************************************************
global y "lncdisburold_w199"
global regcommands ", absorb(bankid#time prov) vce(cluster bankid prov)"

clear *
**# Bookmark (input)
use $inputdirectory/INB_provbank2015

*gen lncdisburold=100*(ln(disburold)-ln(L.disburold))
gen lncdisburold=100*(ln(disburold)-ln(L.disburold))
keep if time>=tm(2014m7)&time<=tm(2015m6)
winsor2 lncdisburold if lncdisburold!=., suffix(_w199) cuts(1 99)

run RO_tdummies 2015 12
run RO_tdintera 12 "sharedis85"

**# Bookmark (output - column 2)
cd $outputdirectory
est clear
reghdfe $y dT*sharedis85 if dtop85e13==0 $regcommands
est save TABVA_C12, append
cd ..
